/******************************************************************************/
struct Client : ConnectionServer::Client, NetChr // Client
{
   Bool     connection_version_ok; // if client/server use the same version of the protocol
   Flt      time_difference;       // time difference between the client and server, used for detecting speed hacks
   Account  account;               // active account to which client is logged on

   // get
   Bool loggedIn() {return account.name.is();} // if client is currently logged in to a valid account

   // operations
   void leaveGame(); // leave current game
   void logout   (); // leave current game and logout from account

   void set      (ChrInfo    &ci);
   void set      (ChrVisuals &cv);
   void set      (ChrPos     &cp);
   void operator=(ChrPos     &cp);

   // callbacks
   virtual void create(ConnectionServer &server); // called at Client connection creation (inherited from ConnectionServer::Client)

   virtual void    connected(Obj &obj); // called when we're being    connected with 'obj', most likely because objects got close        to   each other (inherited from NetChr::Obj)
   virtual void disconnected(Obj &obj); // called when we're being disconnected with 'obj', most likely because objects got too far away from each other (inherited from NetChr::Obj)

   // network
   void distributeToNeighbors(File &f, bool skip_direct_connections=false);

   // update
   virtual Bool update(); // process incoming data from the connection (inherited from ConnectionServer::Client)

  ~Client();
   Client();
};
/******************************************************************************/
